// min-vuex 实现 state、mutations
import Vue from "vue";
import Vuex from "../min-vuex.js";
const store = new Vuex.Store({
  state: {
    count: 0,
  },
  mutations: {
    // n => 接收的传过来的参数
    increment(state, n) {
      state.count += n;
    },
    decrease(state) {
      state.count--;
    },
  },
});
Vue.prototype.$store = store;
